import request from '@/utils/request'
// 获取文章分类的接口
export const articleGetChannelListService = ()=>
request.get('/my/cate/list')

// 获取文章分类详情的接口
export const articleGetInfoService = (id)=>
   // id:文章分类的id
  request.get('/my/cate/info',{params:{id}})

// 添加文章分类的接口
export const articleAddListService = (data)=>
  request.post('/my/cate/add',data)

// 删除文章分类的接口
export const articleDelListService = (id)=>
  // id:文章分类的id
  request.delete('/my/cate/del',{params:{id}})

  // 更新文章分类的接口
export const articleUpdateListService = (data)=>
  //id:文章分类的id
  //cate_name:文章分类的名字
  //cate_alias:文章分类的别名
  request.put('/my/cate/info',data)
// 根据条件查询文章列表的接口
export const articlGetArticleListService = (paramsObj)=>
  request.get('/my/article/list',{
    params:paramsObj
  }
  )
//根据文章id获取文章详情的接口
export const articleGetArticleDetailService = (id)=>
  request.get('/my/article/info',{params:{id}})

//添加文章的接口
export const articlePublishArticle = (data)=>
  request.post('/my/article/add',data)

//删除文章的接口
export const articleDeleteArticle = (id)=>
  request.delete('/my/article/info',{params:{id}})

//修改文章的接口
export const articleUpdateArticle = (data)=>
  request.put('/my/article/info',data)
